package com.ruoyi.system.service;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.Surver;
import com.ruoyi.system.domain.SysDevice;
import com.ruoyi.system.domain.SysDeviceData;
import com.ruoyi.system.domain.SysDeviceOmen;
import com.ruoyi.system.domain.SysReport;
import com.ruoyi.system.domain.SurverAnswer;
import com.ruoyi.system.domain.SysRoom;
import com.ruoyi.system.domain.SysSong;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * (SysDeviceData)表服务接口
 *
 * @author makejava
 * @since 2022-03-16 10:44:34
 */
public interface ICommonService {

    String queryReportUrl(Long userId,Long deviceDataId,String conclusion,String programme) throws Exception;

    void sendIm(long userId,int position,int pointNum,String message);

    void sendLineIm(Long userId, String startTime, String endTime) throws InterruptedException;

    void sendImTest(Long userId,String message);

    void stopLineIm(Long userId);

    List<SysUser> queryUserByUserId(Long userId);

    List<SysDeviceData> queryDeviceDataByUserId(Long userId);

    void sendUserId(Long userId);

    void sendUserIMTest();

    String queryDeviceDataById(Long deviceDataId);

    List<SysDevice> queryDeviceByUserId(Long userId);

    void saveRadarData(String deviceCode, String dataKey, String dataValue, Date now);

    List<SysDevice> queryDeviceByDeptId(Long deptId);

    List<SysDevice> queryDeviceByType(List<Integer> deviceTypeList);

    Long queryUserIdByDeviceCode(String deviceCode);

    SysReport exportPdf(Long userId, List<Map<String, Object>> subtitleList);

    Map<String,Object> queryRadarData(Long userId, String deviceCode, String startTime, String endTime);

    Map<String,Object> addRadarUser(String openid, String phone, String name, String sex, String age, String height, String weight, String medical, String urgentName, String urgentPhone);

    List<SysReport> queryReport(Long userId);

    List<Surver> queryAllSurver();

    void addAnswer(List<SurverAnswer> answerList);

    List<Map<String,Object>> queryAnswer(Long userId, Long surverId);

    List<Map<String,Object>> queryRadarByUserId(Long userId);

    List<Map<String,Object>> queryRadarByUser(Long userId);

    List<Map<String,Object>> queryPdfData();

    Map<String, String> creatEchartImg(Long userId, String deviceCode, Date date, Map<String, Object> map);

    void insertSleepScale(Long userId, String deviceCode, Date date, Map<String, Object> map);

    AjaxResult addDevice(Long userId, String deviceCode, String deviceName, Integer deviceType, String roomNum, String roomName);

    void addOmen(Long userId, List<Map> omenList) throws Exception;

    void handleOmen(Long userId, Long omenId);

    SysDeviceOmen queryOmenById(Long omenId);

    List<SysRoom> queryRoomByUser(Long userId);

    Map<String, Object> censusData();

    SysUser queryUserById(Long userId);

    void delDevice(Long userId, String deviceCode);

    List<Map<String, Object>> queryCensusData(Long userId, String deviceCode, String dataKey, Integer dateType, String startTime, String endTime);

    List<SysSong> querySong(String keywords);

    Map<String, Object> queryFootwave();

    void saveDressData(Long userId, String dataKey, String dataValue, Date date);

    List<Map<String,Object>> queryDressDataYear(Long userId, String dataKey);

    List<Map<String,Object>> queryDressDataMonth(Long userId, String dataKey);

    List<Map<String,Object>> queryDressDataDay(Long userId, String dataKey);
}
